package work3

class practice2 {
  class Calculator(x:Int,y:Int,z:String){
    z match{
      case "+"=> println(x+y)
      case "-"=> println(x-y)
      case "*"=> println(x*y)
      case "/"=> println(x/y)
      case "%"=> println("Invalid operator")
    }
  }
}
